Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Node / ReticulumProjects / MeshChatX.git / files / docs / nomadmesh_pages.md

Displaying Raw • View renderedDownload


docs/nomadmesh_pages.md 83db6cedfdaa3b8b484d0069d20fea9727b7bae6 (83db6ced) Text, 3.47 KB

Tc9d1d9# NomadNet Network browser and Mesh Server pages

MeshChatX can serve pages from a **Mesh Server** (local Reticulum page node) found in the tools section and display them in the **NomadNet** browser. Pages are fetched over the usual Nomad path convention: Ta5d6ff`/page/<filename>`.

Tc9d1d9## Supported filenames

| Extension | Role |
| --------- | ------------------------------------------------------------ |
| Ta5d6ff`.mu` | **Micron** markup (NomadNet default). |
| Ta5d6ff`.md` | **Markdown** (GitHub-flavored features via the renderer). |
| Ta5d6ff`.txt` | **Plain text** (shown escaped, monospace-friendly wrapping). |
| Ta5d6ff`.html` | **Static HTML** with **CSS only** (see security below). |

If you add a page without a recognised extension, the server stores it as **`.mu`**. Filenames with other extensions (for example Ta5d6ff`.exe`) are rejected when saving through the API.

Tc9d1d9## Plain text (`.txt`)

Content is **HTML-escaped** and shown with **pre-wrapped** whitespace. There is no Markdown parsing on Ta5d6ff`.txt` pages.

Tc9d1d9## Markdown (`.md`)

Tff7b72- **Not the same engine as chat:** Conversations use the lightweight **`MarkdownRenderer`** (HTML-escaped first, then patterns for headers, bold, code, links). Nomad **`.md`** pages use **`marked`** (GFM-oriented) plus sanitisation, so features and edge cases can differ. Automated tests cover both paths.
Tff7b72- Use **ATX headings** with a hash and a **space** before the title, for example Ta5d6ff`# Title`, Ta5d6ff`## Section`, Ta5d6ff`#### Subsection`. CommonMark requires that space; MeshChatX may normalise some common shorthand forms, but relying on the standard form is safest.
Tff7b72- Line breaks and spacing: the viewer preserves wrapping behaviour suitable for technical text; fenced code blocks keep indentation.
Tff7b72- Links are **sanitised**: off-mesh Ta5d6ff`http`/Ta5d6ff`https` links in rendered content are removed or restricted so the preview cannot drive external navigation without mesh-style URLs.

Tc9d1d9## HTML (`.html`)

Tff7b72- **JavaScript** is not executed: Ta5d6ff`script` tags and event-handler attributes are stripped.
Tff7b72- **External resources** are blocked where possible: Ta5d6ff`@import` and Ta5d6ff`url(...)` pointing at Ta5d6ff`http://`, Ta5d6ff`https://`, or protocol-relative URLs are removed from CSS. Embedded Ta5d6ff`<style>` blocks are kept; rules that target Ta5d6ff`html` or Ta5d6ff`body` are **rewritten** to apply to the viewer’s root container so your layout still applies.
Tff7b72- **Links**: Ta5d6ff`href` values that are not mesh-style (Ta5d6ff`:` paths, 32-character hex prefixes, Ta5d6ff`/page/...`, Ta5d6ff`/file/...`, or Ta5d6ff`#` fragments) are removed. Images only keep Ta5d6ff`data:image/...` sources for inline images.
Tff7b72- The viewer uses a **sans-serif** font for HTML and Markdown so pages do not inherit the monospace Micron chrome. You can override colours and typography with your own CSS.

Tc9d1d9## Mesh Server API

Tff7b72- Ta5d6ff`POST /api/v1/page-nodes/{node_id}/pages` with Ta5d6ff`name` and Ta5d6ff`content` saves a page; invalid extensions return **400** with a short message.
Tff7b72- Listed pages only include files with allowed extensions in the Ta5d6ff`pages/` directory.

Tc9d1d9## Archives

Snapshots in **Archives** use the same rendering pipeline as the Nomad browser (Micron, Markdown, text, sanitised HTML) using the archived Ta5d6ff`page_path` to pick the format. Exports keep the original extension when it is Ta5d6ff`.mu`, Ta5d6ff`.md`, Ta5d6ff`.txt`, or Ta5d6ff`.html`.

Tc9d1d9## See also

Tff7b72- Architecture overview: Ta5d6ff`meshchatx.md` in this docs bundle.
Tff7b72- Default Nomad entry path remains Ta5d6ff`/page/index.mu` unless you change the URL in the browser.


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────